<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>查询结果</title>
		<style>
td{
	border-right:1px solid #cbdced;
	border-bottom: 1px solid #cbdced;
	padding:3px;
}

th{
	background-color:#cbdced;
	padding:3px;
	border-right:1px solid #fff;
	border-bottom:1px solid #fff;
}
table{
	clear:both;
	border-top: 1px solid #cbdced;
	border-left: 1px solid #cbdced;
}
body{
	font-size:14px;
}
.green{
	color:green;
}

.red{
	color:red;
}

.blue{
	background-color: blue;
	color:white;
}

.brown{
	background-color: brown;
	color:white;
}

.chocolate{
	background-color: chocolate;
	color:white;
}

.sienna{
	background-color:sienna;
	color:white;
}

.exportBtn{
	margin-right:30px;
	margin-top:2px;
	margin-bottom:2px;
	float:right;
	display:block;
	padding:1px;
}

span[class=exportBtn]:hover{
	background-color:#8A95A1;
	color:white;
}
		</style>
		<script type="text/javascript">
		function allChecksChange(obj){
			checks = document.getElementsByTagName("input");
			for(i = 0; i < checks.length; i++){
				o = checks[i];
				type = o.attributes.getNamedItem("type");
				if(type.nodeValue == 'checkbox'){
					o.checked = obj.checked;
				}
			}
			//checks.checked = obj.checked;
		}
		
		function deleteConfirm(){
		return window.confirm('你确实要删除选中的这些记录吗？');
		}
		</script>
	</head>
	<body>
	<{if $advancedSearch}>
	<div id="sbar" style="width:100%; padding: 0px 0px 4px 0px; border-bottom:1px solid #c9d7f1;">
			<span><a href="excelUpload.html">表格上传</a></span>
			| <span><a href="index.html">主页</a></span>
			| <span><a href="advancedSearch.html">回到高级搜索</a></span>
	</div>
	<{/if}>
	
	<form action="batchDelete.php" method="POST" onsubmit="return deleteConfirm()" >
	
	<{if $fache_materialCode or $fachuan_materialCode or $main_sequenceNumber}>
			<span class="exportBtn">
				<input type="submit" value=" 删除选中 "/>
			</span>
			<span class="exportBtn">
				<a href="exportAdvancedTableStat.php?materialCode=<{$materialCode}>&thicknessFrom=<{$thicknessFrom}>&thicknessTo=<{$thicknessTo}>&widthFrom=<{$widthFrom}>&widthTo=<{$widthTo}>&lengthFrom=<{$lengthFrom}>&lengthTo=<{$lengthTo}>&faDateFrom=<{$faDateFrom}>&faDateTo=<{$faDateTo}>&shipsClassification=<{$shipsClassification}>&material=<{$material}>&uploadTimeFrom=<{$uploadTimeFrom}>&uploadTimeTo=<{$uploadTimeTo}>&filename=<{$filename}>&orderNumber=<{$orderNumber}>&orderSubitemNumber=<{$orderSubitemNumber}>&unitPrice=<{$unitPrice}>&batchNumber=<{$batchNumber}>&purchaseNumber=<{$purchaseNumber}>&destination=<{$destination}>&storePlace=<{$storePlace}>&sequenceNumber=<{$sequenceNumber}>&manufactory=<{$manufactory}>
				&certificateNumber=<{$certificateNumber}>&checkoutBatch=<{$checkoutBatch}>&materialNumber=<{$materialNumber}>&consignmentBatch=<{$consignmentBatch}>
				&ruku=<{$ruku}>&chuku=<{$chuku}>&sale=<{$sale}>&main=<{$main}>&remark=<{$remark}>&faNumber=<{$faNumber}>" title="点击进行导出结果"> 导出表格 </a>
			</span>
	<{else}>
		抱歉没有符合你搜索的条目
	<{/if}>
	
	<table cellpadding="0" cellspacing="0">
		
		<{if $main_sequenceNumber}>
		<tr>
			<th>批次</th>
			<th>日期</th>
			<th>车号/船号</th>
			<th>材料代码</th>
			<th style="size:6em">生产厂家</th>
			<th>船级</th>
			<th>材质</th>
			<th>厚</th>
			<th>宽</th>
			<th>长</th>
			<th>总量</th>
			<th>未入库</th>
			<th>库中</th>
			<th>已销售</th>
			<th>单重</th>
			<th>备注</th>
			<th>上传时间</th>
			<th>上传文件</th>
			<th>订单号</th>
			<th>订单子项号</th>
			<th>受订单价</th>
			<th>批号</th>
			<th width="6px">物料号</th>
			<th>购单号</th>
			<th>目的地</th>
			<th>库存地</th>
			<th>结算</th>
			<th width="6px">证书号</th>
			<th width="6px">结算批号</th>
			<th width="6px">发货批次</th>
			<th style="width:5em">详细</th>
			<th style="width:5em">删除<input type="checkbox" name="i_d" onchange="allChecksChange(this)" /></th>
		</tr>
		<{section name=main loop=$main_sequenceNumber}>
		<tr <{if $main_sumCount[main] eq $main_soldCount[main]}> class="blue" title="此项完成"
			<{elseif $main_unRukuCount[main] eq 0 && $main_soldCount[main] lt $main_sumCount[main]}> class="chocolate" title="全部入库未全部出库"
			<{elseif $main_unRukuCount[main] gt 0 && $main_unRukuCount[main] lt $main_sumCount[main] }> class="brown" title="部分入库"
			<{/if}>
			>
			<td><{$main_sequenceNumber[main]}></td>
			<td><{section name=a loop=$main_date[main]}>
			<{$main_date[main][a]}> <br>
			<{/section}>
			</td>
			<td><{section name=b loop=$main_faNumber[main]}>
			<{$main_faNumber[main][b]}> <br>
			<{/section}>
			</td>
			<td><{$main_materialCode[main]}></td>
			<td><{$main_manufactory[main]}></td>
			<td><{$main_shipsClassification[main]}></td>
			<td><{$main_material[main]}></td>
			<td><{$main_thickness[main]}></td>
			<td><{$main_width[main]}></td>
			<td><{$main_length[main]}></td>
			<td><{$main_sumCount[main]}></td>
			<td><{$main_unRukuCount[main]}></td>
			<td><{$main_kuzhongCount[main]}></td>
			<td><{$main_soldCount[main]}></td>
			<td><{$main_unitWeight[main]}></td>
			<td><{$main_remark[main]}></td>
			<td><{$main_uploadTime[main]}></td>
			<td><{$main_filename[main]}></td>
			<td><{$main_orderNumber[main]}></td>
			<td><{$main_orderSubitemNumber[main]}></td>
			<td><{$main_unitPrice[main]}></td>
			<td><{$main_batchNumber[main]|truncate:15}></td>
			<td><{$main_materialNumber[main]|truncate:15}></td>
			<td><{$main_purchaseNumber[main]}></td>
			<td><{$main_destination[main]}></td>
			<td><{$main_storePlace[main]}></td>
			<td><{if $main_checkout}>
				<a href="editCheckout.php?materialCode=<{$main_materialCode[main]}>&orderNumber=<{$main_orderNumber[main]}>&orderSubitemNumber=<{$main_orderSubitemNumber[main]}>&certificateNumber=<{$main_certificateNumber[main]}>&checkoutBatch=<{$main_checkoutBatch[main]}>">已结算</a>
				<{/if}>
			</td>
			<td><{$main_certificateNumber[main]}></td>
			<td><{$main_checkoutBatch[main]}></td>
			<td><{$main_consignmentBatch[main]}></td>
			<td><a href="search.php?stype=materialCode&keyname=<{$main_materialCode[main]}>&orderNumber=<{$main_orderNumber[main]}>&orderSubitemNumber=<{$main_orderSubitemNumber[main]}>" target="_blank">详细</a></td>
			<td><input type="checkbox" name="main_id<{$main_ids[main]}>" value="<{$main_ids[main]}>" /></td>
		</tr>
		<{/section}>
		<{/if}>
		
		
		
	</table>
	</form>
	</body>
</html>